<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib uri="/struts-tags" prefix="s" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>首页</title>
  </head>
  
  <body>
     <h1 align="center">常见问题检索</h1>
     <form action="faqs_list" align="center">
     <p  >请输入查询关键字：<s:textfield name="classes.cname"></s:textfield><s:submit value="查询"></s:submit><a href="classes_list.action">添加常见问题</a></p>
     </form>
     <h1 align="center">检索结果</h1>
      <s:if test="#flist.size>0">
     <table align="center" border="1px" width="500px">
        <tr bgcolor="blue">
          <td>编号</td>
          <td>标题</td>
          <td>分类</td>
          <td>创建时间</td>
        </tr>
       
	        <s:iterator value="#flist"  status="st" >
	        <s:if test="#st.even == true">
	        <tr bgcolor="pink">
	        </s:if>
	          <td><s:property value="id"/></td>
	          <td><a href="faqs_byidselect.action?id=<s:property value="id"/>"><s:property value="title"/></a></td>
	          <td><s:property value="classes.cname"/></td>
	          <td><s:date name="createdate" format="yyyy-MM-dd"/></td>
	        </tr>
	        </s:iterator>
     </table>
     </s:if>
     <s:else>
        <p align="center" >没有找到和"<s:property value="classes.cname"/>"相关的内容<br/>
            请修改关键字后重试
        </p>
     </s:else>
  </body>
</html>
